package dongshi.daddy.service;

public class MyStubServiceConsumerImpl implements MyStubService {
    private MyStubService myStubService;

    // dubbo会通过构造函数注入
    public MyStubServiceConsumerImpl(MyStubService myStubService) {
        this.myStubService = myStubService;
    }

    @Override
    public String stubSayHello(String sayHello) {
        if ("111".equals(sayHello)) return "from consumer: " + sayHello;
        return myStubService.stubSayHello(sayHello);
    }
}
